﻿@{
    int columnId = Html.CurrentColumnId();
    dynamic infoData = Html.InfoData();
}
<div class="container padding-top-20">
    <div class="row">
        <div class="col-md-3">
            @Html.Partial("subNavPartial")
        </div>
        <div class="col-md-9">
            @Html.Partial("BreadcrumbPartial")

            <div class="clearfix product-content">
                <div>
                    <!--图片组-->
                    @Html.Partial("DetailImagesModel", Html.AttachmentDataList(new { ParentTable = "product", ParentField = "images", ParentId = (int)infoData.Id }))
                </div>

                <div class="detail padding-top-20">
                    <div class="title">产品介绍</div>
                    <div class="info-content padding-top-20">
                        @Html.Raw(infoData.Content)
                    </div>
                </div>
            </div>
            @{
                dynamic prevData = Html.InfoDataPrevious();
                dynamic nextData = Html.InfoDataNext();
            }
            <div class="clearfix padding-top-20 line-height-2">
                <ul>
                    @if (prevData != null)
                    {
                        string url = Html.InfoDataUrl((int)prevData.ColumnId, (int)prevData.Id);
                        <li class="text-gray">上一篇：<a href="@url">@prevData.Title</a></li>
                    }
                    @if (nextData != null)
                    {
                        string url = Html.InfoDataUrl((int)nextData.ColumnId, (int)nextData.Id);
                        <li class="text-gray">下一篇：<a href="@url">@nextData.Title</a></li>
                    }
                </ul>
            </div>

        </div>
    </div>
</div>

<script type="text/javascript">
    var $lb_clicks = $("#lb_clicks");
    $.post("/E/InfoData/AddClicks", { ColumnId:@infoData.ColumnId,Id:@infoData.Id}, function (data) { $lb_clicks.text(data)})
</script>